<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <!-- /* 触发对象/目标对象 事件由谁而起的 e.target (IE低版本浏览器不兼容) IE使用
  window.event.srcElement */ -->
  <body>
    <ul class="ul1">
      <li>111</li>
      <li>222</li>
      <li>
        <div>333</div>
      </li>
      <span>444</span>
    </ul>

    <script>
      var ul1 = document.querySelector(".ul1");
      ul1.onclick = function (ev) {
        var e = ev || window.event;
        // 触发事件类型
        var type = e.type;
        alert(type);
        //触发对象
        var target = e.target || window.event.srcElement;
        alert(target.innerHTML + ", " + target.tagName);
      };
    </script>
  </body>
</html>
